package com.md.service;

import com.md.entity.Student;
import com.md.mapper.StudentMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentServices implements StudentService{
    @Autowired
    private StudentMapper studentMapper;
    @Override
    public List<Student> selectAll() {
        return studentMapper.selectAll();
    }

    @Override
    public Student selectById(int id) {
        return studentMapper.selectById(id);
    }

    @Override
    public int deleteById(int id) {
        return studentMapper.deleteById(id);
    }

    @Override
    public int updateById(Student student) {
        return studentMapper.updateById(student);
    }

    @Override
    public List<Student> insertById(Student student) {
        return studentMapper.insertById(student);
    }

    @Override
    public List<Student> selectByIds(String studentName) {
        return studentMapper.selectByIds(studentName);
    }


}

